home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / elk-2_0.lha / elk-2.0 / scripts / linkext.ld.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1992-11-03  |  434b  |  20 lines

  1. #!/bin/sh
  2.  
  3. # Link one dynamically loadable extension (an object file); or
  4. # combine several object files into one dynamically loadable extension
  5. # and resolve against libraries.
  6. #
  7. # Arguments are the output file and one or more object files and libraries.
  8.  
  9. if [ $# = 0 ]; then
  10.     echo Usage: "$0: output-file object-files [libraries]"
  11.     exit 1
  12. fi
  13.  
  14. output=$1
  15. shift
  16.  
  17. ld -r @obj_ldflags@ @xflag@ $*
  18. mv a.out $output
  19. chmod 644 $output
  20.